﻿using System;
using System.Linq;
using System.Collections.Generic;

namespace ToyundaPhone.Database
{
	public partial class Playlist
	{
		public int SongCount
		{
			get
			{
				return this._PlaylistSongs.Count;
			}
		}

		partial void OnCreated()
		{
			this._PlaylistSongs.CollectionChanged += _PlaylistSongs_CollectionChanged;
		}

		void _PlaylistSongs_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
		{
			SendPropertyChanged("SongCount");
		}
	}

	public partial class Song
	{
		public int PlaylistCount
		{
			get
			{
				return this._PlaylistSongs.Count;
			}
		}

		partial void OnCreated()
		{
			this._PlaylistSongs.CollectionChanged += _PlaylistSongs_CollectionChanged;
		}

		void _PlaylistSongs_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
		{
			SendPropertyChanged("PlaylistCount");
		}
	}
}
